<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table border="1">
    <caption>用户列表</caption>
    <tr>
        <th>名字</th>
        <th>密码</th>
        <th>昵称</th>
    </tr>
</table>
<script>
    let arr=[{name:"zs",password:'123456',nickname:'zss'},{name:"李四",password:'123456',nickname:'lss'},{name:"王五",password:'123456',nickname:'www'},];
    for (let a of arr) {
        let tr=document.createElement("tr");
        let td1=document.createElement("td");
        let td2=document.createElement("td");
        let td3=document.createElement("td");
        td1.innerText=a.name;
        td2.innerText=a.password;
        td3.innerText=a.nickname;
        tr.append(td1,td2,td3);
        let table=document.querySelector("table");
        table.append(tr);
    }
</script>
</body>
</html>